<#include "../head_top.ftl">
		<title>Convert CSV To HTML</title>
        <meta name="description" content="Tool for converting CSV to HTML">
        <meta name="keywords" content="Convert CSV to HTML, CSV, HTML">
<#include "../head_down.ftl">
    
    <body>
		<#include "/template/common/navigator.ftl">
        <div class="container">
            <div class="row">
                <div class="span10">
                    <div id="listing-post-container">
                    	<h1>CSV To HTML</h1>
						<p></p>
						<p></p>
						<p></p>
						<p>This tool is used to convert CSV content to HTML,which can be view directly by web users.</p>						
						<form method="post" action="csv2html" id="form1">
							<table>							
								<tr id="postTr">
									<td>
										CSV Content:
										<textarea cols="105" rows="15" name="content" id="content">${content!''}</textarea>
									</td>
								</tr>
								<tr>
									<td>	
										<input type="radio" id="splitChar1" name="splitChar" value="comma" <#if "${customSplitChar!''}"=="" && "${splitChar!''}"=="comma">checked="checked"</#if> />comma
										<input type="radio" id="splitChar2" name="splitChar" value="tab" <#if "${customSplitChar!''}"=="" && "${splitChar!''}"=="tab">checked="checked"</#if> />tab
										<input type="radio" id="splitChar3" name="splitChar" value="space" <#if "${customSplitChar!''}"=="" && "${splitChar!''}"=="space">checked="checked"</#if>/>space
										Custom:<input type="text" id="splitChar4" name="customSplitChar" value="${customSplitChar!''}"/>
										<input type="button" value="Format" onclick="doSubmit()"/>
									</td>
								</tr>
							</table>
						</form>
						Result:
						<textarea cols="105" rows="15" name="contentResult" readonly="readonly">${contentResult!''}</textarea>
                    </div>
                </div>
                <!--/span10 -->
                <#include "/template/tool/tool_right.ftl">
                <!--/.span4 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /container -->
		<#include "/template/common/tail.ftl">
    </body>
    <!-- end of body -->
	<script>
		function doSubmit(action){
			if(document.getElementById("content").value.trim()==""){
				alert("SQL is not input.");
			}else{
				document.getElementById("form1").submit();
			}
		}
	</script>
</html>